<?php

namespace App\Exports;

use App\Models\Admin\DealRecord;
use Maatwebsite\Excel\Concerns\FromCollection;

class BdOrderPoolExport implements FromCollection
{
    private $data;

    public function __construct($data)
    {
        $this->data = $data;
    }

    /**
    * @return \Illuminate\Support\Collection
    */
    public function collection()
    {
        $title = ["店铺ID", "用户ID", "用户等级", "应得金额"];
        $data = $this->data;

        return collect([
            $title,
            $data
        ]);
    }
}
